#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<ctype.h>
int main(void)
{
	float n = 0;
	int i = 0, j = 0;
	char ch = 0;
	while ((ch = getchar()) != EOF)
	{
		if (isspace(ch))
			i++;
		if (ispunct(ch))
			i++;
		if (isalpha(ch))
			j++;
	}
	n = (float)j / i;
	printf("%f", n);

	return 0;
}